package com.cn.code.utils;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

public class CommonUtils {

	    public static String getConfig(String key) {
	        ResourceBundle resourceBundle =ResourceBundle.getBundle("config");
	    	if(resourceBundle==null){
	    		return "";
	    	}
	        if (key == null || key.equals("") || key.equals("null")) {
	            return "";
	        }
	        String result = "";
	        try {
	            result = resourceBundle.getString(key);
	        } catch (MissingResourceException e) {
	            e.printStackTrace();
	        }
	        return result;
	    }
}
